<template>
	<div class="firstDiv">

	<div class="container">
		<div>
			<PageTop v-on:childByValue="childByValue"></PageTop>
			<div class="navigation_bar ">
				<ul class="nav nav-tabs nav-justified">
					<li class="nav-item"><a class="nav-link" href="/#/home">首页</a></li>
					<li class="nav-item"><a class="nav-link" href="/#/mnzy">模拟填志愿</a></li>
					<li class="nav-item"><a class="nav-link active" href="/#/schoolQuery">查学校</a></li>
					<li class="nav-item"><a class="nav-link" href="/#/major">查专业</a></li>
					<!-- <li class="nav-item"><a class="nav-link" href="/">智能选大学</a></li> -->
						<li class="nav-item"><a class="nav-link" href="/#/echarts">高考大数据</a></li>
					<li class="nav-item"><a class="nav-link" href="/#/chat">在线答疑</a></li>
				</ul>
			</div>
		</div>

		<div class="school">
			<School :userCity="userCity"></School>
		</div>


		<div class="bottom">
			<PageBottom></PageBottom>
		</div>
	</div>

	</div>
</template>

<script>
	import PageTop from '../../components/basic/PageTop.vue'
	import PageBottom from '../../components/basic/PageBottom.vue'
	import School from '../school.vue'

	export default{
		name: 'SchoolQuery',
		data(){
			return{
				userCity: '青岛',
			}
		},
		methods:{
			//从Page Top组件中获取切换城市得到的城市值
			childByValue(childValue) {
			    // childValue就是子组件传过来的值
			    this.userCity = childValue;

			   }
		},
		created() {
			// console.log(this.userCity);
		},
		components:{
			PageTop,
			PageBottom,
			School
		}
	}
</script>

<style scoped>
	.firstDiv{
		background-image: url(../../assets/backimg5.png);
	}
	.navigation_bar {
		margin-top: 20px;
	}


	.navigation_bar ul.nav>li>a {
		color: #000000;
		font-size: 17px;
		font-weight: bold;
	}

</style>
